﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ucCalendar.ascx.cs" 
    Inherits="CANO.WebSite.UserControls.ucCalendar" %>
<%@ Import Namespace="CANO.Data.DAOs.Calendar" %>
<link href="/css/dp_calendar.css" type="text/css" rel="Stylesheet" />
<div id="3dayCalendar" class="calendar_list
" style="height: 100%; float: left; background-color: #FAFAFA; padding: 1px; padding-left: 5px;border: 1px solid #DBDBDB;padding-right: 5px;">
    <asp:Repeater ID="calendarRepeater" runat="server">
    <itemtemplate>
    <div id="calendar" class="dp_calendar">

        <div class="div_dates">
            
            <div class="day_name" id="day_name">
                <h1>
                    <%# ((DaySection)Container.DataItem).dayName%>
                </h1>
                <div class="div_month">
                    <span class="span_month"><%# ((DaySection)Container.DataItem).dateDisplay%></span><br>
                </div>
            </div>
            <div class="clear">
            </div>
        </div>
        <div class="calendar_list">
            
            <ul id="list">
			<asp:Panel ID="pnlSinCompromisos" runat="server" Visible="true">
				<h1>No existen compromisos en este día.</h1>
			</asp:Panel>
                <asp:Repeater ID="DayEventsRepeater" runat="server" DataSource='<%# ((DaySection)Container.DataItem).events %>'>
                <ItemTemplate>
                    <li class="low" onclick="javascript:window.location = '../compromisos/Compromiso.aspx?id=<%# ((CANO.Data.DAOs.Event)Container.DataItem).eventID %>&Type=<%# ((CANO.Data.DAOs.Event)Container.DataItem).typeID %>'">
                        <div class="time">
                            <%# ((CANO.Data.DAOs.Event)Container.DataItem).dateTimeEventShort%>
                        </div>
                        <h1>
                            <%# ((CANO.Data.DAOs.Event)Container.DataItem).eventTypeDisplay%></h1>
                        <div class="clear">
                        </div>
                        <p>
                            <%# ((CANO.Data.DAOs.Event)Container.DataItem).description%></p>
                    </li>
                </ItemTemplate>
                </asp:Repeater>
            </ul>
        </div>
    </div>
    </itemtemplate>
    </asp:Repeater>

<script type="text/javascript">
	$(document).ready(function () {
    	
//        // Bind the Share btn to Open the Modal
//        $('.calendar_list li').click(function () {
//            var $dialog = $('#dialogContainer')
//            .html('<p>Loading...</p>')
//            .dialog({
//                autoOpen: false,
//                title: 'Share the item',
//                position: ['center', 150],
//                width: 450,
//                focus: function (event, ui) {
//                    $('#dialogcloser').click(function () {
//                        $dialog.dialog('close');
//                    });
//                },
//                open: function (event, ui) {
//                    $("#dialogContainer").load("http://www.google.com.ar?q=");
//                }
//            });
//            $dialog.dialog('open');
//        });
    });    
</script>